package com.game.cards.monsters;
import com.game.cards.*;
import com.game.play.Events;
import com.game.play.Game;
import com.game.play.Player;

public class SolarFlareDragon extends MonsterCard{
	
	public SolarFlareDragon()
	{
		this.title = "Solar Flare Dragon";
		this.description = "As long as this card is on the field \n Every time that you end your turn \n" +
		"Your opponent loses 500 life points.";
		
		this.type = Type.Pyro;
		this.attribute = Attribute.fire;
		this.stars = 4;
		
		this.flags.add(Flags.triggereffect);
		this.flags.add(Flags.effect);
		
		this.attacks = 1;
		this.attacksPerTurn = 1;
		
		this.attack = 1500;
		this.defense = 1000;
		
		this.trigger = Events.endturn;
	}
	
	public boolean test(Game game)
	{
		String[] args =  (game.getCurrentTurn().getAq().getEventArgs(this.getTrigger()));
		
		Player t = game.getOffTurn();
		
		if (t != this.getDeck().getOwner()) {t.setLifePoints(t.getLifePoints()-500);
		
		System.out.println("Solar Flare Dragon burned the opponent for 500 lifepoints!");
		return true;
		}
		return false;
	}
	
}
